﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Castle.ActiveRecord;
using NHibernate.Criterion;
using LIB;
using System.Collections;

public partial class template_quan_huyen : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            int catID = ConvertUtility.ToInt32(Request.QueryString["catID"]);
            if (catID > 0)
            {
                hidQuan.Value = catID.ToString();
                repMucGia.DataSource = Category_Info.searchInQuanHuyen(catID);
                repMucGia.DataBind();
            }
        }
        catch (Exception ex) { }
    }
    protected void repMucGia_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        int quanID = ConvertUtility.ToInt32(hidQuan.Value);
        HyperLink hypLink = (HyperLink)e.Item.FindControl("hypLink");
        int phuongID = ConvertUtility.ToInt32(hypLink.NavigateUrl);
        Category_Info catQuan = Category_Info.Find(quanID);
        Category_Info catPhuong = Category_Info.Find(phuongID);
        hypLink.NavigateUrl = "/bat-dong-san/" + quanID + "/" + phuongID + "/" + App_String.getTitleKhongDau(catQuan.catName) + "/" + App_String.getTitleKhongDau(catPhuong.catName) + ".html";

    }
}